{% extends 'login_base.html' %}

{%block main %}
<div class="col-md-6 col-md-offset-3">
    <div class="row">
        <table class="table" style="border-collapse:separate; border-spacing:0px 15px;">
            <thead>
            <h3>
                About User
                <small><a href="{{ url_for('useraccounts.setting') }}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> </a></small>
            </h3>
            </thead>
            <tbody>
                <tr>
                    <td>Username:</td>
                    <td>{{ user.username }}</td>
                </tr>
                <tr>
                    <td>Email:</td>
                    <td>{{ user.email }}<br>
                        {% if user.confirmed == False %}
                        <span>Please check <a href="{{ url_for('blog_admin.send_confirm') }}">here</a> to confirm your account.</span>
                        {% endif %}
                    </td>
                </tr>
                <tr>
                    <td>About_me:</td>
                    <td>{{ user.about_me }}</td>
                </tr>
                <tr>
                    <td>Homepage:</td>
                    <td>
                        {% if user.homepage_url %}
                        <a href="{{ user.homepage_url }}"><i class="fa fa-home fa-lg"></i></a> {{ user.homepage_url }}
                        {% else %}
                        Not yet
                        {% endif %}
                    </td>
                </tr>
                <tr>
                    <td>Social Network:</td>
                    <td>
                    {% if user.social_networks['github']['url'] %}
                        <a href='{{ user.social_networks["github"]["url"] }}'><i class="fa fa-github fa-lg"></i></a>
                    {% endif %}
                    {% if user.social_networks['weibo']['url'] %}
                        <a href='{{ user.social_networks["weibo"]["url"] }}'><i class="fa fa-weibo fa-lg"></i></a>
                    {% endif %}
                    {% if user.social_networks['twitter']['url'] %}
                    <a href='{{ user.social_networks["twitter"]["url"] }}'><i class="fa fa-twitter fa-lg"></i></a>
                    {% endif %}
                    {% if user.social_networks['facebook']['url'] %}
                    <a href='{{ user.social_networks["facebook"]["url"] }}'><i class="fa fa-facebook fa-lg"></i></a>
                    {% endif %}
                    {% if user.social_networks['wechat']['url'] %}
                        <a id="btn_weixin" href='{{ user.social_networks["wechat"]["url"] }}'><i class="fa fa-weixin fa-lg"></i></a>
                        <!-- weixin -->
                        <div id="weixin" class="hidden">
                            <br>
                            <img src="{{ user.social_networks["wechat"]["url"] }}?imageView/2/w/150" title="weixin">
                        </div>
                    {% endif %}
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
{% endblock %}

